/*
 * apple的APNS代理：配置好的push证书，放到同一目录
 */
var apns = require('apn');
var options = {"gateway": "gateway.sandbox.push.apple.com"}; // gateway.push.apple.com
var apnsProxy = new apns.Connection(options);

var token = '...';
var targetDev = new apns.Device(token);

var notify = apns.Notification();
notify.expiry = Math.floor(Date.now() / 1000) + 3600;
notify.badge = 1;
notify.sound = 'ping.aiff';
notify.alert = 'nice to meet you..';
notify.payload = { 'messageForm': 'Caroline'};

apnsProxy.pushNotification(notify, targetDev);